package com.wangzh.time;

import java.time.LocalDate;
import java.time.Period;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class PeriodDemo {
    public static void main(String[] args) {
        LocalDate now = LocalDate.now();
        LocalDate localDate = LocalDate.of(2000, 12, 1);
        System.out.println(localDate);

        Period between = Period.between(localDate, now);
        System.out.println(between.getYears());
        System.out.println(between.getMonths());
        System.out.println(between.toTotalMonths());

        List<String> list = new ArrayList<>();
        list.add("1");

    }
}
